package com.ocm.burnningstar.View;

import android.support.v7.widget.GridLayoutManager;

/**
 * Created by ocm on 2018-02-11.
 */

public class HorSpanSizeLookup extends GridLayoutManager.SpanSizeLookup{
    int spanCount =0;

    public HorSpanSizeLookup(int spanCount) {
        this.spanCount = spanCount;
    }

    @Override
    public int getSpanSize(int position) {
        int[][] count = {{24,0,0,0},{12,12,0,0},{9,6,9,0},{6,6,6,6}};
        int tmp = position%spanCount;
        return  count[spanCount-1][tmp];
    }
}
